# include "sis.hpp"
# include "config-mode.hpp"

// move this to sis-night.hpp:
# if MODE_NIGHT_SET_MUTE == _key_gammastep
  # define NIGHT_SET_MUTE_OFF "gammastep -O 2500K"

  // need kill night if running in sway:
  # define NIGHT_SET_MUTE_ON "gammastep -x"
# elif MODE_NIGHT_SET_MUTE == _key_redshift
  # define NIGHT_SET_MUTE_OFF "redshift -O 2500K"
  # define NIGHT_SET_MUTE_ON "redshift -x"
# endif /* MODE_NIGHT_SET_MUTE */

int
main (int argc, char** args)
{
  str command;
  if (__strup "" == args[1])
    {
      // \n\t - eqauale "_"
      run ("echo  keys: on off\n\ton - night-mode on\n\toff - night-mode off");
      
      exit (EXIT_FAILURE);
    } else
    {
      command = args[1];
    }

  if ("on" == command)
    {
      run (NIGHT_SET_MUTE_ON);
    } else if ("off" == command)
    {
      run (NIGHT_SET_MUTE_OFF);
    }

  exit (EXIT_SUCCESS);
}

